package com.huawei.hwclouds.lubanops.demo.product.biz.service;

import org.springframework.beans.factory.annotation.Autowired;

import com.alibaba.dubbo.config.annotation.Service;
import com.huawei.hwclouds.lubanops.demo.product.biz.api.ProductService;
import com.huawei.hwclouds.lubanops.demo.product.biz.mapper.MerchandiseMapper;
import com.huawei.hwclouds.lubanops.demo.product.biz.model.MerchandiseModel;

@Service
public class ProductServiceImpl implements ProductService<MerchandiseModel> {

    @Autowired
    private MerchandiseMapper mapper;

    @Override
    public MerchandiseModel queryProducts(Integer id) {
        return mapper.retrieveById(id);
    }

    @Override
    public void createProduct(MerchandiseModel model) {
        mapper.create(model);
    }
}
